
package entitys;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@Entity
@Inheritance(strategy=InheritanceType.JOINED)


public class Person implements Serializable {
    

    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name ="PersonId")
    
    private long id;
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "PersonID")
    private Long idPerson;
    @Column(length = 15)
    private String name;
    @Column(length = 15)
    private String lastname;
    @Column(length = 15)
    private String SSN;
    @Temporal(TemporalType.DATE)
    private Date birthDate;
    @Column(length = 15)
    private String birthPlace;
   
    
    public Person( ){
        super();
    }
    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name = name;
    }
    public String getLastName(){
        return lastname;
    }
    public void setLastName(String lastname){
        this.lastname = lastname;
    }
    public String getSSN(){
        return SSN;
    }
    public void setSSN(String SSN){
        this.SSN = SSN;
    }
    public Date getbirthDate(){
        return birthDate;
    }
    public void setbirthDate(Date birthDate){
        this.birthDate = birthDate;
    }
    public String getbirthPlace(){
        return birthPlace;
    }
    public void setbirthPlace(String birthPlace){
        this.birthPlace = birthPlace;
    }

    public Long getIdPerson() {
        return idPerson;
    }

    public void setIdPerson(Long idPerson) {
        this.idPerson = idPerson;
    }

    
    }
